import {createRouter, createWebHistory} from 'vue-router'
import LayoutView from '../views/layout/index.vue'
import IndexView from '../views/index/index.vue'
import LoginView from '../views/login/index.vue'
import UserView from '../views/user/index.vue'
import CategoryView from '../views/category/index.vue'
import SupplierView from '../views/supplier/index.vue'
import ItemView from '../views/item/index.vue'
import WarehouseView from '../views/warehouse/index.vue'
import DeliveryView from '../views/delivery/index.vue'
import OutBoundOrderView from '../views/outbound/index.vue'
import LogisticsView from '../views/logistics/index.vue'
import StockTakingView from '../views/stocktaking/index.vue'
import QarehouseOperations from '../views/warehouse/warehouseoperations.vue'

const routes = [{
    path: '/',
    component: LayoutView,
    redirect: '/index',
    children: [
        {path: '/index', name: 'index', component: IndexView},
        {path: '/user', name: 'user', component: UserView},
        {path: '/category', name: 'category', component: CategoryView},
        {path: '/supplier', name: 'supplier', component: SupplierView},
        {path: '/item', name: 'item', component: ItemView},
        {path: '/warehouse', name: 'warehouse', component: WarehouseView},
        {path: '/logistics', name: 'logistics', component: LogisticsView},
        {path: '/delivery', name: 'delivery', component: DeliveryView},
        {path: '/outboundorder', name: 'outboundorder', component: OutBoundOrderView},
        {path: '/stocktaking', name: 'stocktaking', component: StockTakingView},
        {path: '/warehouseProcessing', name: 'warehouseProcessing', component: QarehouseOperations}
    ]
}, {path: '/login', name: 'login', component: LoginView}]

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
})

export default router
